package com.brainardphotography.blog.web;

import java.util.List;

import com.brainardphotography.blog.BlogEntry;
import com.brainardphotography.blog.dao.BlogEntryDAO;
import com.google.inject.Inject;
import com.google.sitebricks.At;
import com.google.sitebricks.http.Get;

@At("/browse")
public class Browse extends BasePage {
	private static final long serialVersionUID = -7056555839999528240L;

	@Inject
	private BlogEntryDAO entryDAO;
	
	private List<BlogEntry> entries;

	public List<BlogEntry> getBlogEntries() {
		return this.entries;
	}
	
	@Get
	public void get() {
		entries = entryDAO.findAll();
	}
}
